import Vue from 'vue'
import VueRouter from 'vue-router'
import SystemView from '../views/SystemView.vue'


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'login',
        component: () => import('@/views/LoginView.vue')
    },

    // {
    //     path:'/Home',
    //     name:'Home',
    //     component:Home,
    //     children:[
    //         {
    //             path:'/role',
    //             name:'Role',
    //             component:Role
    //         },
    //
    //         {
    //             path:'/Manager',
    //             name:'Manager',
    //             component:Manager
    //         }
    //     ]
    // },
    {
        path: '/system',
        name: 'SystemView',
        component: SystemView,
        children: [
            { name: '首页', path: '/home', component: () => import('@/views/HomeView.vue') },
            { name: '用户管理', path: '/managerUser', component: () => import('@/views/ManagerView.vue') },
            { name: '个人中心', path: '/userCenter', component: () => import('@/views/UserCenterView.vue') },
            { name: '菜品管理', path: '/DishListView', component: () => import('@/views/dish/DishListView.vue') },
            { name: '分类管理', path: '/CategoryView', component: () => import('@/views/dish/CategoryView.vue') },
            {name: '套餐管理', path: '/SetmealView', component: () => import('@/views/dish/SetmealView.vue')},
            {name: '注册店铺', path: '/registerStore', component: () => import('@/views/RegisterStoreView.vue')},
            {name: '订单中心', path: '/orderCenter', component: () => import('@/views/OrderView.vue')},
        ]
    },
    {
        path: '/register',
        name: 'register',
        component: () => import('@/views/RegisterView.vue')
    }, {
        path: '/login',
        name: 'login',
        component: () => import('@/views/LoginView.vue')
    }

]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})



export default router
